package com.ebc.eservice.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ebc.eservice.mapper.LogErrorInfoMapper;
import com.ebc.eservice.service.LogInfoService;
import com.ebc.eservice.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * @author: Joey
 * @Description:日志业务
 * @date:2022/9/19 10:12
 */
@Service
public class LogImp implements LogInfoService {


//    @Autowired
//    private LogInfoMapper logInfoMapper;
    @Autowired
    private LogErrorInfoMapper logErrorInfoMapper;

    @Override
    public JsonResult getLogInfo() {
//        List<LogInfo> logInfoList = new ArrayList<>();
//        //分页
//        Page<LogInfo> page = new Page<>(1, 5);
//        // QueryWrapper<Userms> queryWrapper = new QueryWrapper<>();
//        //不写条件查询所有
//        IPage<LogInfo> infoIPage = logInfoMapper.selectPage(page, null);
//        //页面信息
//        page.getRecords().forEach(System.out::println);

//        HashMap<String, Object> map = new HashMap<>();
//        map.put("logList",page.getRecords());
//
        return JsonResult.success("map");
    }

    @Override
    public JsonResult getErrorLog() {

        return JsonResult.success("");
    }
}
